Skip to content

fix(driver-turso): make better-sqlite3 optional peer dependency for Vercel compatibility#1132

Merged
xuyushun441-sys merged 1 commit intomainfrom
claude/fix-driver-turso-requirement
Apr 14, 2026
Merged

fix(driver-turso): make better-sqlite3 optional peer dependency for Vercel compatibility#1132
xuyushun441-sys merged 1 commit intomainfrom
claude/fix-driver-turso-requirement

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 14, 2026

driver-turso was forcing better-sqlite3 installation for all users, causing Vercel deployments to fail due to native binding compilation errors. The driver only needs better-sqlite3 in local/replica modes, not remote mode.

Changes

  • Move better-sqlite3 to optional peer dependency — allows remote-only users to skip installation
  • Add better-sqlite3 to devDependencies — preserves test compatibility
  • Document dependency requirements by mode — clarifies when better-sqlite3 is needed

Usage

Remote mode (Vercel/Edge):

pnpm add @objectstack/driver-turso
# better-sqlite3 NOT required

Local/Replica modes:

pnpm add @objectstack/driver-turso better-sqlite3

The driver auto-detects mode from the URL — remote mode (libsql://) uses only @libsql/client, while local/replica modes (file:) extend SqlDriver and require better-sqlite3.

…ercel compatibility

Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/d01337a6-ea24-478a-9cca-8b9ce8e46e39

Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-demo Error Error Apr 14, 2026 6:38am
objectstack-play Ready Ready Preview, Comment Apr 14, 2026 6:38am
spec Ready Ready Preview, Comment Apr 14, 2026 6:38am

Request Review

@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review April 14, 2026 06:38
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file size/s labels Apr 14, 2026
@xuyushun441-sys xuyushun441-sys merged commit 9f0712c into main Apr 14, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants